<?php


class goods
{
	static $defaultKey		= 'goods_id';
	
	
	static function goodsInfo($search)
	{
		if(is_array($search))
		{
			if(is_array($search[0]))
			{
				foreach($search as $v)
				{
					$temp=array_keys($search);
					$searchs[]="#".$temp[0]."#=:".$v.":";
				}
				$key=implode(' and ', $searchs);
			}
			else 
			{
				$temp=array_keys($search);
				$key="#".$temp[0]."#=:".reset($search).":";
			}
		}
		else 
		{
			$key="#".self::$defaultKey."#=:".$search.":";
		}
		echo $key;
	}
	
	
}